/***********************************************************
* Replication Archive for "Equal Treatment and the Inelasticity of Tax Policy to Rising Inequality" CPS 2021                        *
* January 2021
* Kenneth Scheve (Yale) and David Stasavage (NYU) 
***********************************************************/

clear all
set more off

log using "SS_CPS_2021_Replication", replace

/**
Historical Inquality Analysis: Tables 1-3
**/

use inequalityanalysis.dta, clear

keep if year==1860|year==1865|year==1870|year==1875|year==1880|year==1885|year==1890|year==1895|year==1900|year==1905|year==1910|year==1915|year==1920|year==1925|year==1930|year==1935|year==1940|year==1945|year==1950|year==1955|year==1960|year==1965|year==1970|year==1975|year==1980|year==1985|year==1990|year==1995|year==2000|year==2005|year==2010 /*Keep only five-year intervals*/

gen period=.
replace period=1 if year==1860
replace period=2 if year==1865
replace period=3 if year==1870
replace period=4 if year==1875
replace period=5 if year==1880
replace period=6 if year==1885
replace period=7 if year==1890
replace period=8 if year==1895
replace period=9 if year==1900
replace period=10 if year==1905
replace period=11 if year==1910
replace period=12 if year==1915
replace period=13 if year==1920
replace period=14 if year==1925
replace period=15 if year==1930
replace period=16 if year==1935
replace period=17 if year==1940
replace period=18 if year==1945
replace period=19 if year==1950
replace period=20 if year==1955
replace period=21 if year==1960
replace period=22 if year==1965
replace period=23 if year==1970
replace period=24 if year==1975
replace period=25 if year==1980
replace period=26 if year==1985
replace period=27 if year==1990
replace period=28 if year==1995
replace period=29 if year==2000
replace period=30 if year==2005
replace period=31 if year==2010

qby countryn: gen wealth_ipolate_lag = wealth_ipolate[_n-1]
qby countryn: gen wealth_ipolate_lag2 = wealth_ipolate[_n-2]
qby countryn: gen wealth_ipolate_lag3 = wealth_ipolate[_n-3]

qby countryn: gen top_inheritance_n_lag = top_inheritance_n[_n-1]  
qby countryn: gen top_inheritance_n_lag2 = top_inheritance_n[_n-2]
qby countryn: gen top_inheritance_n_lag3 = top_inheritance_n[_n-3]

qby countryn: gen top_incrate_nl_lag=top_incrate_nl[_n-1]
qby countryn: gen top_incrate_nl_lag2=top_incrate_nl[_n-2]
qby countryn: gen top_incrate_nl_lag3=top_incrate_nl[_n-3]

qby countryn: gen top_incrate_n_lag=top_incrate_n[_n-1]
qby countryn: gen top_incrate_n_lag2=top_incrate_n[_n-2]
qby countryn: gen top_incrate_n_lag3=top_incrate_n[_n-3]

qby countryn: gen Top1incomeshare_ipolate_lag=Top1incomeshare_ipolate[_n-1]
qby countryn: gen Top1incomeshare_ipolate_lag2=Top1incomeshare_ipolate[_n-2]
qby countryn: gen Top1incomeshare_ipolate_lag3=Top1incomeshare_ipolate[_n-3]

qby countryn: gen Top01incomeshare_ipolate_lag=Top01incomeshare_ipolate[_n-1]
qby countryn: gen Top01incomeshare_ipolate_lag2=Top01incomeshare_ipolate[_n-2]
qby countryn: gen Top01incomeshare_ipolate_lag3=Top01incomeshare_ipolate[_n-3]

qby countryn: gen Top001incomeshare_ipolate_lag=Top001incomeshare_ipolate[_n-1]
qby countryn: gen Top001incomeshare_ipolate_lag2=Top001incomeshare_ipolate[_n-2]
qby countryn: gen Top001incomeshare_ipolate_lag3=Top001incomeshare_ipolate[_n-3]

qby countryn: gen rgdppc_lag=rgdppc[_n-1]

* Table 1 

xi: reg top_incrate_nl top_incrate_nl_lag Top1incomeshare_ipolate_lag year i.country if year>=1900 & year<=2010, robust
xi: reg top_incrate_nl top_incrate_nl_lag Top1incomeshare_ipolate_lag i.country i.year if year>=1900 & year<=2010, robust
xi: reg Top1incomeshare_ipolate Top1incomeshare_ipolate_lag top_incrate_nl_lag year i.country if year>=1900 & year<=2010, robust
xi: reg Top1incomeshare_ipolate Top1incomeshare_ipolate_lag top_incrate_nl_lag i.country i.year if year>=1900 & year<=2010, robust

* Table 2  

xi: reg top_incrate_nl top_incrate_nl_lag Top001incomeshare_ipolate_lag year i.country if year>=1900 & year<=2010, robust
xi: reg top_incrate_nl top_incrate_nl_lag Top001incomeshare_ipolate_lag i.country i.year if year>=1900 & year<=2010, robust
xi: reg Top001incomeshare_ipolate Top001incomeshare_ipolate_lag top_incrate_nl_lag year i.country if year>=1900 & year<=2010, robust
xi: reg Top001incomeshare_ipolate Top001incomeshare_ipolate_lag top_incrate_nl_lag i.country i.year if year>=1900 & year<=2010, robust

* Table 3 

xi: reg top_inheritance_n top_inheritance_n_lag wealth_ipolate_lag year i.country if year>=1900 & year<=2010, robust
xi: reg top_inheritance_n top_inheritance_n_lag wealth_ipolate_lag i.country i.year if year>=1900 & year<=2010, robust
xi: reg wealth_ipolate wealth_ipolate_lag top_inheritance_n_lag year i.country if year>=1900 & year<=2010, robust
xi: reg wealth_ipolate wealth_ipolate_lag top_inheritance_n_lag i.country i.year if year>=1900 & year<=2010, robust

clear all

/**
German Survey Analysis: Figure 1a; Figure 2a; Table 4; Table A.1 
**/

use "STAN0117_DE_OUTPUT.dta", clear

/****
Variable and global variable construction
*****/

gen female=0
replace female=1 if gender==2

gen age=2019-birthyr

gen age1834 = cond(age >= 18 & age <= 34, 1, 0)
gen age3554 = cond(age >= 35 & age <= 54, 1, 0)
gen agegt55 = cond(age > 55, 1, 0)

label var female "Female"
label var age "Age"
label var educ_de "Education"

gen universityEduc=0
replace universityEduc=1 if educ_de>=7

ren Q26 indiv_inc

rename Bracket5 linearTaxOver250k 

rename Q72 equal_treat  
label variable equal_treat "Should government treat citizens equally?"
recode equal_treat 1=5 2=4 3=3 4=2 5=1
label define equal_treat_lbl 	1 "Treat citizens differently" ///
									2 "2" ///
									3 "3" ///
									4 "4" ///
									5 "Treat citizens equally", replace
label values equal_treat equal_treat_lbl

gen treatEqualdi = cond(equal_treat >= 3, 1, 0)

rename Q31 cons_ec_ideology
recode cons_ec_ideology 1=5 2=4 3=3 4=2 5=1
label variable cons_ec_ideology "Economic ideological self-identification"
label define ideology_lbl 	1 "Very conservative" ///
								2 "Conservative " ///
								3 "Moderate" ///
								4 "Progressive" ///
								5 "Very Progressive", replace
label values cons_ec_ideology ideology_lbl

gen CDUCSUsupporter=0
replace CDUCSUsupporter=1 if Q29==1 & Q30==1

tab CDUCSUsupporter

rename Q54 work_luck
label variable work_luck "Work hard or lucky to get ahead?"
label define work_luck_lbl 1 "Hard work is most important" ///
	2 "Hard work & luck are equally important" ///
	3 "Luck is the most important", replace
label values work_luck work_luck_lbl

gen hardwork=1 if work_luck==1
replace hardwork=0 if work_luck==2|work_luck==3

ren Q51 problemIneq
label define problemIneq_lbl 	1 "Not a problem" ///
								2 "A small problem" ///
								3 "A problem" ///
								4 "A serious problem" ///
								5 "A very serious problem", replace
label values problemIneq problemIneq_lbl

gen age1830=0
replace age1830=1 if age>=18 & age<=30
gen age3150=0
replace age3150=1 if age>=31 & age<=50
gen age5165=0
replace age5165=1 if age>=51 & age<=65
gen agegt65=0
replace agegt65=1 if age>65


* Figure 1a 
hist equal_treat, start(1) d percent xtitle(Equal Treatment) bcolor(navy) xlabel(1(1)5) graphregion(color(white))
graph export de_main_equal_hist.pdf, replace

* Figure 2a 
heatplot equal_treat problemIneq, discrete ytitle(Equal Treatment) xtitle(Inequality a Problem) xlabel(1(1)5) ylabel(1(1)5) colors(hcl, blues reverse) keylabels(,f(%12.2f)) graphregion(color(white))
graph export de_main_equal_ineq_heat.pdf, replace

* Table 4

reg linearTaxOver250k equal_treat [pweight=weight], robust
reg linearTaxOver250k equal_treat female age3150 age5165 agegt65 universityEduc indiv_inc [pweight=weight], robust
reg linearTaxOver250k equal_treat female age3150 age5165 agegt65 universityEduc indiv_inc  cons_ec_ideology [pweight=weight], robust
reg linearTaxOver250k equal_treat female age3150 age5165 agegt65 universityEduc indiv_inc  CDUCSUsupporter [pweight=weight], robust
reg linearTaxOver250k equal_treat female age3150 age5165 agegt65 universityEduc indiv_inc  hardwork [pweight=weight], robust
reg linearTaxOver250k equal_treat female age3150 age5165 agegt65 universityEduc indiv_inc  problemIneq [pweight=weight], robust

* Table A.1

sum female age1830 age3150 age5165 agegt65 universityEduc
svyset caseid [pweight=weight]
svy: mean female age1830 age3150 age5165 agegt65 universityEduc

clear all

/**
UK Survey Analysis: Figure 1b; Figure 2b; Table 5; Table A.2 
**/

use "UK full survey (indiv, with contextual data).dta", clear

/****
Variable and global variable construction
*****/
gen controlprime=0  
replace controlprime=1 if treats==1

gen defenseprime=0  
replace defenseprime=1 if treats==2

gen welfareprime=0  
replace welfareprime=1 if treats==3

gen higheredprime=0  
replace higheredprime=1 if treats==4

gen age1834 = cond(age >= 18 & age <= 34, 1, 0)
gen age3554 = cond(age >= 35 & age <= 54, 1, 0)
gen agegt55 = cond(age > 55, 1, 0)

gen noQual = cond(educ == 1, 1, 0) if educ != .
gen otherQual = cond(educ >= 2 & educ <= 10, 1, 0) if educ != .
gen alvl = cond(educ == 11 | educ == 12, 1, 0) if educ != .
gen grads = cond(educ >= 15 & educ <= 18, 1, 0) if educ != .

label var female "Female"
label var age "Age"
label var educ "Education"
label var isMarried "Married"
label var pcnuk2015 "% non-UK born"
label var changedPC "Has moved"
label var hh_inc "HH income"
label var workingClass "Working Class"
label var middleClass "Middle Class"

rename q18 taxOver150k  
gen linearTaxOver150k = .
replace linearTax = 0 if taxOver150k == 1
replace linearTax = 5 if taxOver150k == 2
replace linearTax = 10 if taxOver150k == 3
replace linearTax = 15 if taxOver150k == 4
replace linearTax = 20 if taxOver150k == 5
replace linearTax = 25 if taxOver150k == 6
replace linearTax = 30 if taxOver150k == 7
replace linearTax = 35 if taxOver150k == 8
replace linearTax = 40 if taxOver150k == 9
replace linearTax = 50 if taxOver150k == 10
replace linearTax = 60 if taxOver150k == 11
replace linearTax = 70 if taxOver150k == 12
replace linearTax = 80 if taxOver150k == 13

rename q31 equal_treat  
label variable equal_treat "Should government treat citizens equally?"
recode equal_treat 1=5 2=4 3=3 4=2 5=1
label define equal_treat_lbl 	1 "Treat citizens differently" ///
									2 "2" ///
									3 "3" ///
									4 "4" ///
									5 "Treat citizens equally", replace
label values equal_treat equal_treat_lbl

gen treatEqualdi = cond(equal_treat >= 3, 1, 0)

rename rightwing right_ideology
replace right_ideology=right_ideology + 1
label variable right_ideology "Ideological self-identification"
label define ideology_lbl 	1 "Left" ///
								2 "2" ///
								3 "3" ///
								4 "4" ///
								5 "5" ///
								6 "6" ///
								7 "7" ///
								8 "8" ///
								9 "9" ///
								10 "10" ///
								11 "Right", replace
label values right_ideology ideology_lbl

rename q33 work_luck
label variable work_luck "Work hard or lucky to get ahead?"
label define work_luck_lbl 1 "Hard work is most important" ///
	2 "Hard work & luck are equally important" ///
	3 "Luck is the most important", replace
label values work_luck work_luck_lbl

gen hardwork=1 if work_luck==1
replace hardwork=0 if work_luck==2|work_luck==3

gen reduceIneq = .
replace reduceIneq = 1 if q49 == 2 & q50 == 1
replace reduceIneq = 2 if q49 == 2 & q50 == 2
replace reduceIneq = 3 if q49 == 2 & q50 == 3
replace reduceIneq = 4 if q49 == 3
replace reduceIneq = 5 if q49 == 1 & q50 == 3
replace reduceIneq = 6 if q49 == 1 & q50 == 2
replace reduceIneq = 7 if q49 == 1 & q50 == 1
gen ineqAverse = cond(reduceIneq > 4, 1, 0) if reduceIneq != .


rename q47 govtsvcs
label variable govtsvcs "Should the government provide more, fewer, or the same # of services as it does now?"
label define more_fewer_same_lbl 1 "More" 2 "Fewer" 3 "Same", replace
label values govtsvcs more_fewer_same_lbl

rename q48 govtsvcs_preflvl
label variable govtsvcs_preflvl "If govt should provide more/fewer services, how much?"
label define scale_lot_slightly 1 "A lot" 2 "Somewhat" 3 "Slightly", replace
label values govtsvcs_preflvl scale_lot_slightly

gen moregovtservices7=.
replace moregovtservices7=1 if govtsvcs==2 & govtsvcs_preflvl==1
replace moregovtservices7=2 if govtsvcs==2 & govtsvcs_preflvl==2
replace moregovtservices7=3 if govtsvcs==2 & govtsvcs_preflvl==3
replace moregovtservices7=4 if govtsvcs==3
replace moregovtservices7=5 if govtsvcs==1 & govtsvcs_preflvl==3
replace moregovtservices7=6 if govtsvcs==1 & govtsvcs_preflvl==2
replace moregovtservices7=7 if govtsvcs==1 & govtsvcs_preflvl==1
label variable moregovtservices7 "Should the government provide more, fewer, or the same # of services as it does now?"
label define moregovtservices7_lbl 1 "A lot fewer" 2 "somewhat fewer" 3 "slighter fewer" 4 "same" 5 "slightly more" 6 "somewhat more" 7 "a lot more", replace
label values moregovtservices7 moregovtservices7_lbl

gen cons_id=0
replace cons_id=1 if partyPref==1

gen lab_id=0
replace lab_id=1 if partyPref==2

gen age1830=0
replace age1830=1 if age>=18 & age<=30
replace age3150=0
replace age3150=1 if age>=31 & age<=50
gen age5165=0
replace age5165=1 if age>=51 & age<=65
gen agegt65=0
replace agegt65=1 if age>65

* Figure 1b 
hist equal_treat, start(1) d percent xtitle(Equal Treatment) bcolor(navy) xlabel(1(1)5) ylabel(0(10)40) graphregion(color(white))
graph export uk_main_equal_hist.pdf, replace

* Figure 2b 
heatplot equal_treat reduceIneq, discrete ytitle(Equal Treatment) xtitle(Reduce Inequality) xlabel(1(1)7) ylabel(1(1)5) colors(hcl, blues reverse) keylabels(,f(%12.2f)) graphregion(color(white))
graph export uk_main_equal_ineq_heat.pdf, replace

* Table 5
reg linearTaxOver150k equal_treat [pweight=weight], robust
reg linearTaxOver150k equal_treat female age3150 age5165 agegt65 universityEduc hh_inc [pweight=weight], robust
reg linearTaxOver150k equal_treat female age3150 age5165 agegt65 universityEduc hh_inc  right_ideology [pweight=weight], robust
reg linearTaxOver150k equal_treat female age3150 age5165 agegt65 universityEduc hh_inc  cons_id [pweight=weight], robust
reg linearTaxOver150k equal_treat female age3150 age5165 agegt65 universityEduc hh_inc  hardwork [pweight=weight], robust
reg linearTaxOver150k equal_treat female age3150 age5165 agegt65 universityEduc hh_inc  reduceIneq [pweight=weight], robust

* Table A.2

sum female age1830 age3150 age5165 agegt65 universityEduc 
svyset caseid [pweight=weight]
svy: mean female age1830 age3150 age5165 agegt65 universityEduc 

clear all

/**
US Experimental Survey Analysis: Table 6; Table 7; Table A.3
**/

use CCES18_NYU_OUTPUT.DTA, replace

/****
Variable and global variable construction
*****/

gen EqualTreatExpos=0
replace EqualTreatExpos=1 if IMAGES_rand==1

gen ProgTaxQ_first=0
replace ProgTaxQ_first=1 if NYU345_347_rand==1

gen ProgTaxOrder=NYU345

gen ProgTaxD1=.
replace ProgTaxD1=0 if NYU345==1
replace ProgTaxD1=1 if NYU345==2
replace ProgTaxD1=1 if NYU345==3

gen ProgTaxD2=.
replace ProgTaxD2=0 if NYU345==1
replace ProgTaxD2=0 if NYU345==2
replace ProgTaxD2=1 if NYU345==3

gen equal_treat=.
replace equal_treat=1 if NYU346==5
replace equal_treat=2 if NYU346==4
replace equal_treat=3 if NYU346==3
replace equal_treat=4 if NYU346==2
replace equal_treat=5 if NYU346==1

gen HardWork=0
replace HardWork=1 if NYU347==1

gen female=0
replace female=1 if gender==2

gen somecollege=0
replace somecollege=1 if educ==3
replace somecollege=1 if educ==4

gen college4degplus=0
replace college4degplus=1 if educ==5
replace college4degplus=1 if educ==6

gen black=0
replace black=1 if race==2

gen hisp=0
replace hisp=1 if race==3

gen othermin=0
replace othermin=1 if race==4
replace othermin=1 if race==5
replace othermin=1 if race==6
replace othermin=1 if race==7
replace othermin=1 if race==8

gen faminc2=faminc_new
replace faminc2=. if faminc_new==97

gen age=2018-birthyr
gen age1830=0
replace age1830=1 if age>=18 & age<=30
gen age3150=0
replace age3150=1 if age>=31 & age<=50
gen age5165=0
replace age5165=1 if age>=51 & age<=65
gen agegt65=0
replace agegt65=1 if age>65

gen constolibideo=.
replace constolibideo=1 if CC18_334A==7
replace constolibideo=2 if CC18_334A==6
replace constolibideo=3 if CC18_334A==5
replace constolibideo=4 if CC18_334A==4
replace constolibideo=5 if CC18_334A==3
replace constolibideo=6 if CC18_334A==2
replace constolibideo=7 if CC18_334A==1

gen right_ideology=.
replace right_ideology=1 if CC18_334A==1
replace right_ideology=2 if CC18_334A==2
replace right_ideology=3 if CC18_334A==3
replace right_ideology=4 if CC18_334A==4
replace right_ideology=5 if CC18_334A==5
replace right_ideology=6 if CC18_334A==6
replace right_ideology=7 if CC18_334A==7

gen dem_pid=0
replace dem_pid=1 if pid3==1

gen rep_pid=0
replace rep_pid=1 if pid3==2

gen ind_pid=0
replace ind_pid=1 if pid3==3

gen pid7republican=pid7
replace pid7republican=. if pid7==8

* Table 6
regress ProgTaxOrder EqualTreatExpos female somecollege college4degplus faminc2 black hisp othermin pid7republican [pweight=teamweight], robust
regress equal_treat EqualTreatExpos female somecollege college4degplus faminc2 black hisp othermin pid7republican [pweight=teamweight], robust

* Table 7
regress ProgTaxOrder equal_treat female somecollege college4degplus faminc2 black hisp othermin pid7republican, robust
ivreg2 ProgTaxOrder female somecollege college4degplus faminc2 black hisp othermin pid7republican (equal_treat=EqualTreatExpos), robust

* Table A.3

sum female age1830 age3150 age5165 agegt65 college4degplus black hisp
svyset caseid [pweight=teamweight]
svy: mean female age1830 age3150 age5165 agegt65 college4degplus black hisp

clear all

/**
UK Pilot Survey Analysis: Table A.4; Table A.5
**/

use "Brexit pilot (with IPW and context data).dta", clear

/****
Variable and global variable construction
*****/

rename Q15 taxUnder10k
rename Q16 tax10_45k
rename Q17 tax45_150k
rename Q18 taxOver150k
gen linearTaxOver150k = .
replace linearTax = 0 if taxOver150k == 1
replace linearTax = 5 if taxOver150k == 2
replace linearTax = 10 if taxOver150k == 3
replace linearTax = 15 if taxOver150k == 4
replace linearTax = 20 if taxOver150k == 5
replace linearTax = 25 if taxOver150k == 6
replace linearTax = 30 if taxOver150k == 7
replace linearTax = 35 if taxOver150k == 8
replace linearTax = 40 if taxOver150k == 9
replace linearTax = 50 if taxOver150k == 10
replace linearTax = 60 if taxOver150k == 11
replace linearTax = 70 if taxOver150k == 12
replace linearTax = 80 if taxOver150k == 13

gen statusquo_prompt=q15_18Rand

rename Q31 equal_treat
label variable equal_treat "Should government treat citizens equally?"
recode equal_treat 1=5 2=4 3=3 4=2 5=1
label define equal_treat_lbl 	1 "Treat citizens differently" ///
									2 "2" ///
									3 "3" ///
									4 "4" ///
									5 "Treat citizens equally", replace
label values equal_treat equal_treat_lbl

gen treatEqualdi = cond(equal_treat >= 3, 1, 0)

rename Q39 right_ideology
label variable right_ideology "Ideological self-identification"
label define ideology_lbl 	1 "Left" ///
								2 "2" ///
								3 "3" ///
								4 "4" ///
								5 "5" ///
								6 "6" ///
								7 "7" ///
								8 "8" ///
								9 "9" ///
								10 "10" ///
								11 "Right", replace
label values right_ideology ideology_lbl

rename Q33 work_luck
label variable work_luck "Work hard or lucky to get ahead?"
label define work_luck_lbl 1 "Hard work is most important" ///
	2 "Hard work & luck are equally important" ///
	3 "Luck is the most important", replace
label values work_luck work_luck_lbl

gen hardwork=1 if work_luck==1
replace hardwork=0 if work_luck==2|work_luck==3

gen reduceIneq = .
replace reduceIneq = 1 if Q49 == 2 & Q50 == 1
replace reduceIneq = 2 if Q49 == 2 & Q50 == 2
replace reduceIneq = 3 if Q49 == 2 & Q50 == 3
replace reduceIneq = 4 if Q49 == 3
replace reduceIneq = 5 if Q49 == 1 & Q50 == 3
replace reduceIneq = 6 if Q49 == 1 & Q50 == 2
replace reduceIneq = 7 if Q49 == 1 & Q50 == 1
gen ineqAverse = cond(reduceIneq > 4, 1, 0) if reduceIneq != .

rename Q47 govtsvcs
label variable govtsvcs "Should the government provide more, fewer, or the same # of services as it does now?"
label define more_fewer_same_lbl 1 "More" 2 "Fewer" 3 "Same", replace
label values govtsvcs more_fewer_same_lbl

rename Q48 govtsvcs_preflvl
label variable govtsvcs_preflvl "If govt should provide more/fewer services, how much?"
label define scale_lot_slightly 1 "A lot" 2 "Somewhat" 3 "Slightly", replace
label values govtsvcs_preflvl scale_lot_slightly

gen moregovtservices7=.
replace moregovtservices7=1 if govtsvcs==2 & govtsvcs_preflvl==1
replace moregovtservices7=2 if govtsvcs==2 & govtsvcs_preflvl==2
replace moregovtservices7=3 if govtsvcs==2 & govtsvcs_preflvl==3
replace moregovtservices7=4 if govtsvcs==3
replace moregovtservices7=5 if govtsvcs==1 & govtsvcs_preflvl==3
replace moregovtservices7=6 if govtsvcs==1 & govtsvcs_preflvl==2
replace moregovtservices7=7 if govtsvcs==1 & govtsvcs_preflvl==1
label variable moregovtservices7 "Should the government provide more, fewer, or the same # of services as it does now?"
label define moregovtservices7_lbl 1 "A lot fewer" 2 "somewhat fewer" 3 "slighter fewer" 4 "same" 5 "slightly more" 6 "somewhat more" 7 "a lot more", replace
label values moregovtservices7 moregovtservices7_lbl

gen cons_id=0
replace cons_id=1 if partyPref==1

gen lab_id=0
replace lab_id=1 if partyPref==2

gen age1830=0
replace age1830=1 if age>=18 & age<=30
gen age3150=0
replace age3150=1 if age>=31 & age<=50
gen age5165=0
replace age5165=1 if age>=51 & age<=65
gen agegt65=0
replace agegt65=1 if age>65

* Table A.4

tab equal_treat

* Table A.5

reg linearTaxOver150k equal_treat statusquo_prompt [pweight=weight], robust
reg linearTaxOver150k equal_treat female age3150 age5165 agegt65 universityEduc hh_inc statusquo_prompt [pweight=weight], robust
reg linearTaxOver150k equal_treat female age3150 age5165 agegt65 universityEduc hh_inc  right_ideology statusquo_prompt [pweight=weight], robust
reg linearTaxOver150k equal_treat female age3150 age5165 agegt65 universityEduc hh_inc  cons_id statusquo_prompt [pweight=weight], robust
reg linearTaxOver150k equal_treat female age3150 age5165 agegt65 universityEduc hh_inc  hardwork statusquo_prompt [pweight=weight], robust
reg linearTaxOver150k equal_treat female age3150 age5165 agegt65 universityEduc hh_inc  reduceIneq statusquo_prompt [pweight=weight], robust

log close
